using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;
using System.Xml.Serialization;
using System.Text;
using System.Xml;
using System.IO.IsolatedStorage;
using Microsoft.Devices;


namespace A_stain_on_the_planet
{

    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        musicmanager m_Musicmanager;

        HumanLevel m_HumanLevel;

        SeagullLevel m_SeagullLevel;
        SeagullLevelSurvival m_SeagullLevelSurvival;

        FishLevel m_FishLevel;
        FishLevelSurvival m_FishLevelSurvival;
        
        //Levels.StrenghtBar m_StrenghtBar;
        List<Seagull> m_SeagullList;
        List<Fish> m_FishList;

        EventHandler m_Eventhandler;

        SpriteFont Font1;
        Vector2 FontPos;

        BeatReader m_BeatReader;
        Texture2D m_Menu;
        Texture2D m_Hints;
        Texture2D m_GameOverscreen;
        Texture2D m_RestartButton;
        Texture2D m_StartButton;
        Texture2D m_QuitButton;
        Texture2D m_ContinueButton;
        Texture2D m_VictoryScreen;
        Texture2D m_ComingSoon;
        Texture2D m_ChoosYoureLevel;
        Texture2D m_StoryModeButton;
        Texture2D m_HighScoreButton;
        Texture2D m_texMainMenuOil;
        Texture2D m_BackButton;
        Texture2D m_StoryModeScreenButtonTex;
        Texture2D m_SurvivalModeButtonTex;
        Texture2D m_HardmodeButtontex;
        Texture2D m_HighscoreTex;

        BoundingBox m_RestartBB;
        BoundingBox m_StartBB;
        BoundingBox m_QuitBB;
        BoundingBox m_ContinueBB;
        BoundingBox m_Stage1;
        BoundingBox m_Stage2;
        BoundingBox m_Stage3;
        BoundingBox m_HighscoreBB;
        BoundingBox m_StoryModeBB;
        BoundingBox m_SurvivalModeBB;
        BoundingBox m_HardmodeBB;

        System.Random generator = new System.Random();

        const float TAP_TOLERANCE = 20.0f;
        int Score = 0;
        int m_LevelNuber = 0;
        int m_ScoreSeagulls;
        int m_ScoreFishes;
        int m_ScoreHumans;
        int m_TutorialTeller;
        int m_oiltick;
        int m_oiltickdelay;
        float m_StorySlider;
        float m_Delay = 0;
        float m_TimeDelay = 0;

        bool m_SwipeOnly1 = false;
        bool m_showMainMenu = true;
        bool m_ShowChooseLevel = false;
        bool m_InGame = false;
        bool m_bTutorial = false;
        bool m_bStory = false;
        bool m_GameOver = false;
        bool m_Pauzed = false;
        bool m_Victory = false;
        bool m_bComingSoon = false;
        bool m_Level1Completed = false;
        bool m_Level2Completed = false;
        bool m_Level3Completed = false;
        bool m_StoryMode = false;
        bool m_HighscoreMenu = false;
        bool m_SurvivalMode = false;
        bool m_SurvivalModeScreen = false;
        bool m_Hardmode = false;
        string m_Test = "test";
        List<int> m_HighScoreSeagulls;
        List<int> m_HighScoreSeagullsSurvival;
        List<int> m_HighScoreFishes;
        List<int> m_HighScoreFishesSurvival;
        List<int> m_HighScoreHuman;
        List<int> m_HighScoreStory;
        List<Texture2D> m_Tutorials;
        int m_NumberHighscore = 1;
        List<Texture2D> m_StorySlides;

        public struct SaveGameData
        {
            public string PlayerName;
            public Vector2 AvatarPosition;
            public int Level;
            public int Score;
        }

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            IsFixedTimeStep = false;
            // Frame rate is 30 fps by default for Windows Phone.
            TargetElapsedTime = TimeSpan.FromTicks(333333);
            TouchPanel.EnabledGestures = GestureType.Tap | GestureType.FreeDrag;
            
        }

        protected override void Initialize()
        {
            m_InGame = false;
            m_showMainMenu = true;
            m_Musicmanager = new musicmanager(this);
            m_Eventhandler = new EventHandler(this);
            m_Eventhandler.Initialize(m_Musicmanager);
            m_HighScoreSeagulls = new List<int>();
            m_HighScoreFishes = new List<int>();
            m_HighScoreHuman = new List<int>();
            m_HighScoreStory = new List<int>();
            m_HighScoreSeagullsSurvival = new List<int>();
            m_HighScoreFishesSurvival = new List<int>();
            
            base.Initialize();
            m_HighScoreSeagulls = Loading("Seagulls", m_HighScoreSeagulls);
            m_HighScoreFishes = Loading("Fishes", m_HighScoreFishes);
            m_HighScoreHuman = Loading("Humans", m_HighScoreHuman);
            m_HighScoreStory = Loading("Story", m_HighScoreStory);
            m_HighScoreSeagullsSurvival = Loading("SeagullsSurvival", m_HighScoreSeagullsSurvival);
            m_HighScoreFishesSurvival = Loading("FishesSurvival", m_HighScoreFishesSurvival);
            m_Musicmanager.Initialize(Content);
            m_Musicmanager.PlayMainMenu();

        }

        void saving(string Filename)
        {
            #if WINDOWS
                        IsolatedStorageFile savegameStorage = IsolatedStorageFile.GetUserStoreForDomain();
            #else
                        IsolatedStorageFile savegameStorage = IsolatedStorageFile.GetUserStoreForApplication();
            #endif   

            IsolatedStorageFileStream fs = null;
            fs = savegameStorage.OpenFile(Filename + ".txt", System.IO.FileMode.Create);
            if (fs != null)
            {
                if (Filename == "Seagulls")
                {
                    string output = "0";

                    if (m_HighScoreSeagulls.Count != 0)
                    {
                        if (m_HighScoreSeagulls.ElementAt(0) < 10) output = " a000" + m_HighScoreSeagulls.ElementAt(0);
                        else if (m_HighScoreSeagulls.ElementAt(0) < 100) output = " a00" + m_HighScoreSeagulls.ElementAt(0);
                        else if (m_HighScoreSeagulls.ElementAt(0) < 1000) output = " a0" + m_HighScoreSeagulls.ElementAt(0);
                        else output = " a" + m_HighScoreSeagulls.ElementAt(0);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreSeagulls.ElementAt(1) < 10) output = " b000" + m_HighScoreSeagulls.ElementAt(1);
                        else if (m_HighScoreSeagulls.ElementAt(1) < 100) output = " b00" + m_HighScoreSeagulls.ElementAt(1);
                        else if (m_HighScoreSeagulls.ElementAt(1) < 1000) output = " b0" + m_HighScoreSeagulls.ElementAt(1);
                        else output = " b" + m_HighScoreSeagulls.ElementAt(1);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreSeagulls.ElementAt(2) < 10) output = " c000" + m_HighScoreSeagulls.ElementAt(2);
                        else if (m_HighScoreSeagulls.ElementAt(2) < 100) output = " c00" + m_HighScoreSeagulls.ElementAt(2);
                        else if (m_HighScoreSeagulls.ElementAt(2) < 1000) output = " c0" + m_HighScoreSeagulls.ElementAt(2);
                        else output = " c" + m_HighScoreSeagulls.ElementAt(2);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreSeagulls.ElementAt(3) < 10) output = " d000" + m_HighScoreSeagulls.ElementAt(3);
                        else if (m_HighScoreSeagulls.ElementAt(3) < 100) output = " d00" + m_HighScoreSeagulls.ElementAt(3);
                        else if (m_HighScoreSeagulls.ElementAt(3) < 1000) output = " d0" + m_HighScoreSeagulls.ElementAt(3);
                        else output = " d" + m_HighScoreSeagulls.ElementAt(3);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreSeagulls.ElementAt(4) < 10) output = " e000" + m_HighScoreSeagulls.ElementAt(4);
                        else if (m_HighScoreSeagulls.ElementAt(4) < 100) output = " e00" + m_HighScoreSeagulls.ElementAt(4);
                        else if (m_HighScoreSeagulls.ElementAt(4) < 1000) output = " e0" + m_HighScoreSeagulls.ElementAt(4);
                        else output = " e" + m_HighScoreSeagulls.ElementAt(4);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte
                        // just overwrite the existing info for this example.
                    }
                    else
                    {
                        output = " a0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "b0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "c0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "d0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "e0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                    }
                }

                if (Filename == "Fishes")
                {
                    string output = "0";

                    if (m_HighScoreFishes.Count != 0)
                    {
                        if (m_HighScoreFishes.ElementAt(0) < 10) output = " a000" + m_HighScoreFishes.ElementAt(0);
                        else if (m_HighScoreFishes.ElementAt(0) < 100) output = " a00" + m_HighScoreFishes.ElementAt(0);
                        else if (m_HighScoreFishes.ElementAt(0) < 1000) output = " a0" + m_HighScoreFishes.ElementAt(0);
                        else output = " a" + m_HighScoreFishes.ElementAt(0);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreFishes.ElementAt(1) < 10) output = " b000" + m_HighScoreFishes.ElementAt(1);
                        else if (m_HighScoreFishes.ElementAt(1) < 100) output = " b00" + m_HighScoreFishes.ElementAt(1);
                        else if (m_HighScoreFishes.ElementAt(1) < 1000) output = " b0" + m_HighScoreFishes.ElementAt(1);
                        else output = " b" + m_HighScoreFishes.ElementAt(1);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreFishes.ElementAt(2) < 10) output = " c000" + m_HighScoreFishes.ElementAt(2);
                        else if (m_HighScoreFishes.ElementAt(2) < 100) output = " c00" + m_HighScoreFishes.ElementAt(2);
                        else if (m_HighScoreFishes.ElementAt(2) < 1000) output = " c0" + m_HighScoreFishes.ElementAt(2);
                        else output = " c" + m_HighScoreFishes.ElementAt(2);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreFishes.ElementAt(3) < 10) output = " d000" + m_HighScoreFishes.ElementAt(3);
                        else if (m_HighScoreFishes.ElementAt(3) < 100) output = " d00" + m_HighScoreFishes.ElementAt(3);
                        else if (m_HighScoreFishes.ElementAt(3) < 1000) output = " d0" + m_HighScoreFishes.ElementAt(3);
                        else output = " d" + m_HighScoreFishes.ElementAt(3);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreFishes.ElementAt(4) < 10) output = " e000" + m_HighScoreFishes.ElementAt(4);
                        else if (m_HighScoreFishes.ElementAt(4) < 100) output = " e00" + m_HighScoreFishes.ElementAt(4);
                        else if (m_HighScoreFishes.ElementAt(4) < 1000) output = " e0" + m_HighScoreFishes.ElementAt(4);
                        else output = " e" + m_HighScoreFishes.ElementAt(4);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte
                        // just overwrite the existing info for this example.
                    }
                    else
                    {
                        output = " a0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "b0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "c0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "d0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "e0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                    }
                }

                if (Filename == "Humans")
                {
                    string output = "0";

                    if (m_HighScoreHuman.Count != 0)
                    {
                        if (m_HighScoreHuman.ElementAt(0) == 0) output = " a0000";
                        else
                        {
                            if (m_HighScoreHuman.ElementAt(0) < 10) output = " a000" + m_HighScoreHuman.ElementAt(0);
                            else if(m_HighScoreHuman.ElementAt(0) < 100)  output = " a00" + m_HighScoreHuman.ElementAt(0);
                            else if (m_HighScoreHuman.ElementAt(0) < 1000) output = " a0" + m_HighScoreHuman.ElementAt(0);
                            else output = " a" + m_HighScoreHuman.ElementAt(0);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreHuman.ElementAt(1) == 0) output = "b0000";
                        else
                        {
                            if (m_HighScoreHuman.ElementAt(1) < 10) output = " b000" + m_HighScoreHuman.ElementAt(1);
                            else if (m_HighScoreHuman.ElementAt(1) < 100) output = " b00" + m_HighScoreHuman.ElementAt(1);
                            else if (m_HighScoreHuman.ElementAt(1) < 1000) output = " b0" + m_HighScoreHuman.ElementAt(1);
                            else output = " b" + m_HighScoreHuman.ElementAt(1);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreHuman.ElementAt(2) == 0) output = "c0000";
                        else
                        {
                            if (m_HighScoreHuman.ElementAt(2) < 10) output = " c000" + m_HighScoreHuman.ElementAt(2);
                            else if (m_HighScoreHuman.ElementAt(2) < 100) output = " c00" + m_HighScoreHuman.ElementAt(2);
                            else if (m_HighScoreHuman.ElementAt(2) < 1000) output = " c0" + m_HighScoreHuman.ElementAt(2);
                            else output = " c" + m_HighScoreHuman.ElementAt(2);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreHuman.ElementAt(3) == 0) output = "d0000";
                        else
                        {
                            if (m_HighScoreHuman.ElementAt(3) < 10) output = " d000" + m_HighScoreHuman.ElementAt(3);
                            else if (m_HighScoreHuman.ElementAt(3) < 100) output = " d00" + m_HighScoreHuman.ElementAt(3);
                            else if (m_HighScoreHuman.ElementAt(3) < 1000) output = " d0" + m_HighScoreHuman.ElementAt(3);
                            else output = " d" + m_HighScoreHuman.ElementAt(3);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreHuman.ElementAt(4) == 0) output = "e0000";
                        else
                        {
                            if (m_HighScoreHuman.ElementAt(4) < 10) output = " d000" + m_HighScoreHuman.ElementAt(4);
                            else if (m_HighScoreHuman.ElementAt(4) < 100) output = " a00" + m_HighScoreHuman.ElementAt(4);
                            else if (m_HighScoreHuman.ElementAt(4) < 1000) output = " e0" + m_HighScoreHuman.ElementAt(4);
                            else output = " e" + m_HighScoreHuman.ElementAt(4);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte
                        // just overwrite the existing info for this example.
                    }
                    else
                    {
                        output = " a0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "b0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "c0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "d0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "e0000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                    }
                }

                if (Filename == "Story")
                {
                    string output = "0";

                    if (m_HighScoreStory.Count != 0)
                    {
                        if (m_HighScoreStory.ElementAt(0) == 0) output = " a00000";
                        else
                        {
                            if (m_HighScoreStory.ElementAt(0) < 1000) output = " a00" + m_HighScoreStory.ElementAt(0);
                            else if (m_HighScoreStory.ElementAt(0) < 10000) output = " a0" + m_HighScoreStory.ElementAt(0);
                            else output = " a" + m_HighScoreStory.ElementAt(0);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreStory.ElementAt(1) == 0) output = "b00000";
                        else
                        {
                            if (m_HighScoreStory.ElementAt(1) < 1000) output = " b00" + m_HighScoreStory.ElementAt(1);
                            else if (m_HighScoreStory.ElementAt(1) < 10000) output = " b0" + m_HighScoreStory.ElementAt(1);
                            else output = " b" + m_HighScoreStory.ElementAt(1);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreStory.ElementAt(2) == 0) output = "c00000";
                        else
                        {
                            if (m_HighScoreStory.ElementAt(2) < 1000) output = " c00" + m_HighScoreStory.ElementAt(2);
                            else if (m_HighScoreStory.ElementAt(2) < 10000) output = " c0" + m_HighScoreStory.ElementAt(2);
                            else output = " c" + m_HighScoreStory.ElementAt(2);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreStory.ElementAt(3) == 0) output = "d00000";
                        else
                        {
                            if (m_HighScoreStory.ElementAt(3) < 1000) output = " d00" + m_HighScoreStory.ElementAt(3);
                            else if (m_HighScoreStory.ElementAt(3) < 10000) output = " d0" + m_HighScoreStory.ElementAt(3);
                            else output = " d" + m_HighScoreStory.ElementAt(3);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreStory.ElementAt(4) == 0) output = "e00000";
                        else
                        {
                            if (m_HighScoreStory.ElementAt(4) < 1000) output = " e00" + m_HighScoreStory.ElementAt(4);
                            else if (m_HighScoreStory.ElementAt(4) < 10000) output = " e0" + m_HighScoreStory.ElementAt(4);
                            else output = " e" + m_HighScoreStory.ElementAt(4);
                        }
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte
                        // just overwrite the existing info for this example.
                    }
                    else
                    {
                        output = " a00000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "b00000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "c00000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "d00000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "e00000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                    }
                }

                if (Filename == "FishesSurvival")
                {
                    string output = "0";

                    if (m_HighScoreFishesSurvival.Count != 0)
                    {
                        if (m_HighScoreFishesSurvival.ElementAt(0) < 10) output = " a00000" + m_HighScoreFishesSurvival.ElementAt(0);
                        else if (m_HighScoreFishesSurvival.ElementAt(0) < 100) output = " a0000" + m_HighScoreFishesSurvival.ElementAt(0);
                        else if (m_HighScoreFishesSurvival.ElementAt(0) < 1000) output = " a000" + m_HighScoreFishesSurvival.ElementAt(0);
                        else if (m_HighScoreFishesSurvival.ElementAt(0) < 10000) output = " a00" + m_HighScoreFishesSurvival.ElementAt(0);
                        else if (m_HighScoreFishesSurvival.ElementAt(0) < 100000) output = " a0" + m_HighScoreFishesSurvival.ElementAt(0);
                        else output = " a" + m_HighScoreFishesSurvival.ElementAt(0);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreFishesSurvival.ElementAt(1) < 10) output = " b00000" + m_HighScoreFishesSurvival.ElementAt(1);
                        else if (m_HighScoreFishesSurvival.ElementAt(1) < 100) output = " b0000" + m_HighScoreFishesSurvival.ElementAt(1);
                        else if (m_HighScoreFishesSurvival.ElementAt(1) < 1000) output = " b000" + m_HighScoreFishesSurvival.ElementAt(1);
                        else if (m_HighScoreFishesSurvival.ElementAt(1) < 10000) output = " b00" + m_HighScoreFishesSurvival.ElementAt(1);
                        else if (m_HighScoreFishesSurvival.ElementAt(1) < 100000) output = " b0" + m_HighScoreFishesSurvival.ElementAt(1);
                        else output = " b" + m_HighScoreFishesSurvival.ElementAt(1);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreFishesSurvival.ElementAt(2) < 10) output = " c00000" + m_HighScoreFishesSurvival.ElementAt(2);
                        else if (m_HighScoreFishesSurvival.ElementAt(2) < 100) output = " c0000" + m_HighScoreFishesSurvival.ElementAt(2);
                        else if (m_HighScoreFishesSurvival.ElementAt(2) < 1000) output = " c000" + m_HighScoreFishesSurvival.ElementAt(2);
                        else if (m_HighScoreFishesSurvival.ElementAt(2) < 10000) output = " c00" + m_HighScoreFishesSurvival.ElementAt(2);
                        else if (m_HighScoreFishesSurvival.ElementAt(2) < 100000) output = " c0" + m_HighScoreFishesSurvival.ElementAt(2);
                        else output = " c" + m_HighScoreFishesSurvival.ElementAt(2);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreFishesSurvival.ElementAt(3) < 10) output = " d00000" + m_HighScoreFishesSurvival.ElementAt(3);
                        else if (m_HighScoreFishesSurvival.ElementAt(3) < 100) output = " d0000" + m_HighScoreFishesSurvival.ElementAt(3);
                        else if (m_HighScoreFishesSurvival.ElementAt(3) < 1000) output = " d000" + m_HighScoreFishesSurvival.ElementAt(3);
                        else if (m_HighScoreFishesSurvival.ElementAt(3) < 10000) output = " d00" + m_HighScoreFishesSurvival.ElementAt(3);
                        else if (m_HighScoreFishesSurvival.ElementAt(3) < 100000) output = " d0" + m_HighScoreFishesSurvival.ElementAt(3);
                        else output = " d" + m_HighScoreFishesSurvival.ElementAt(3);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreFishesSurvival.ElementAt(4) < 10) output = " e00000" + m_HighScoreFishesSurvival.ElementAt(4);
                        else if (m_HighScoreFishesSurvival.ElementAt(4) < 100) output = " e0000" + m_HighScoreFishesSurvival.ElementAt(4);
                        else if (m_HighScoreFishesSurvival.ElementAt(4) < 1000) output = " e000" + m_HighScoreFishesSurvival.ElementAt(4);
                        else if (m_HighScoreFishesSurvival.ElementAt(4) < 10000) output = " e00" + m_HighScoreFishesSurvival.ElementAt(4);
                        else if (m_HighScoreFishesSurvival.ElementAt(4) < 100000) output = " e0" + m_HighScoreFishesSurvival.ElementAt(4);
                        else output = " e" + m_HighScoreFishesSurvival.ElementAt(4);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte
                        // just overwrite the existing info for this example.
                    }
                    else
                    {
                        output = " a000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "b000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "c000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "d000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "e000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                    }
                }

                if (Filename == "SeagullsSurvival")
                {
                    string output = "0";

                    if (m_HighScoreSeagullsSurvival.Count != 0)
                    {
                        if (m_HighScoreSeagullsSurvival.ElementAt(0) < 10) output = " a00000" + m_HighScoreSeagullsSurvival.ElementAt(0);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(0) < 100) output = " a0000" + m_HighScoreSeagullsSurvival.ElementAt(0);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(0) < 1000) output = " a000" + m_HighScoreSeagullsSurvival.ElementAt(0);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(0) < 10000) output = " a00" + m_HighScoreSeagullsSurvival.ElementAt(0);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(0) < 100000) output = " a0" + m_HighScoreSeagullsSurvival.ElementAt(0);
                        else output = " a" + m_HighScoreSeagullsSurvival.ElementAt(0);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreSeagullsSurvival.ElementAt(1) < 10) output = " b00000" + m_HighScoreSeagullsSurvival.ElementAt(1);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(1) < 100) output = " b0000" + m_HighScoreSeagullsSurvival.ElementAt(1);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(1) < 1000) output = " b000" + m_HighScoreSeagullsSurvival.ElementAt(1);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(1) < 10000) output = " b00" + m_HighScoreSeagullsSurvival.ElementAt(1);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(1) < 100000) output = " b0" + m_HighScoreSeagullsSurvival.ElementAt(1);
                        else output = " b" + m_HighScoreSeagullsSurvival.ElementAt(1);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreSeagullsSurvival.ElementAt(2) < 10) output = " c00000" + m_HighScoreSeagullsSurvival.ElementAt(2);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(2) < 100) output = " c0000" + m_HighScoreSeagullsSurvival.ElementAt(2);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(2) < 1000) output = " c000" + m_HighScoreSeagullsSurvival.ElementAt(2);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(2) < 10000) output = " c00" + m_HighScoreSeagullsSurvival.ElementAt(2);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(2) < 100000) output = " c0" + m_HighScoreSeagullsSurvival.ElementAt(2);
                        else output = " c" + m_HighScoreSeagullsSurvival.ElementAt(2);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreSeagullsSurvival.ElementAt(3) < 10) output = " d00000" + m_HighScoreSeagullsSurvival.ElementAt(3);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(3) < 100) output = " d0000" + m_HighScoreSeagullsSurvival.ElementAt(3);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(3) < 1000) output = " d000" + m_HighScoreSeagullsSurvival.ElementAt(3);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(3) < 10000) output = " d00" + m_HighScoreSeagullsSurvival.ElementAt(3);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(3) < 100000) output = " d0" + m_HighScoreSeagullsSurvival.ElementAt(3);
                        else output = " d" + m_HighScoreSeagullsSurvival.ElementAt(3);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte

                        if (m_HighScoreSeagullsSurvival.ElementAt(4) < 10) output = " e00000" + m_HighScoreSeagullsSurvival.ElementAt(4);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(4) < 100) output = " e0000" + m_HighScoreSeagullsSurvival.ElementAt(4);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(4) < 1000) output = " e000" + m_HighScoreSeagullsSurvival.ElementAt(4);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(4) < 10000) output = " e00" + m_HighScoreSeagullsSurvival.ElementAt(4);
                        else if (m_HighScoreSeagullsSurvival.ElementAt(4) < 100000) output = " e0" + m_HighScoreSeagullsSurvival.ElementAt(4);
                        else output = " e" + m_HighScoreSeagullsSurvival.ElementAt(4);
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length); // a single byte
                        // just overwrite the existing info for this example.
                    }
                    else
                    {
                        output = " a000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "b000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "c000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "d000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                        output = "e000000";
                        fs.Write(System.Text.Encoding.UTF8.GetBytes(output), 0, output.Length);
                    }
                }

                fs.Close();

            }
        }

        private List<int> Loading(string Filename, List<int> list)
        {

            IsolatedStorageFile savegameStorage = IsolatedStorageFile.GetUserStoreForApplication();

            if (Filename == "Story")
            {
                if (savegameStorage.FileExists(Filename + ".txt"))
                {
                    IsolatedStorageFileStream fs = null;
                    fs = savegameStorage.OpenFile(Filename + ".txt", System.IO.FileMode.Open);

                    if (fs != null)
                    {
                        // Reload the last state of the game.  This consists of the UI mode
                        // and any text that was typed on the keyboard input screen. 
                        byte[] saveBytes = new byte[256];
                        int count = fs.Read(saveBytes, 0, 256);
                        list.Clear();

                        // the first byte is the mode, the rest is the string.
                        if (count > 1)
                        {
                            m_Test = System.Text.Encoding.UTF8.GetString(saveBytes, 1, count - 1);
                            for (int i = 0; m_Test.Length > i; ++i)
                            {
                                char Letter = m_Test.ElementAt(i);

                                if (Letter.ToString() == "a")
                                {
                                    string score = "0";
                                    for (int t = 0; 5 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "b")
                                {
                                    string score = "0";
                                    for (int t = 0; 5 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "c")
                                {
                                    string score = "0";
                                    for (int t = 0; 5 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "d")
                                {
                                    string score = "0";
                                    for (int t = 0; 5 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "e")
                                {
                                    string score = "0";
                                    for (int t = 0; 5 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                            }
                        }

                        fs.Close();

                        if (list.Count < 4)
                        {
                            list.Add(00000);
                            list.Add(00000);
                            list.Add(00000);
                            list.Add(00000);
                            list.Add(00000);
                        }
                    }
                }

                else
                {
                    if (list.Count < 4)
                    {
                        list.Add(00000);
                        list.Add(00000);
                        list.Add(00000);
                        list.Add(00000);
                        list.Add(00000);
                    }
                }
                return list;
            }

            else if (Filename == "SeagullsSurvival")
            {
                if (savegameStorage.FileExists(Filename + ".txt"))
                {
                    IsolatedStorageFileStream fs = null;
                    fs = savegameStorage.OpenFile(Filename + ".txt", System.IO.FileMode.Open);

                    if (fs != null)
                    {
                        // Reload the last state of the game.  This consists of the UI mode
                        // and any text that was typed on the keyboard input screen. 
                        byte[] saveBytes = new byte[256];
                        int count = fs.Read(saveBytes, 0, 256);
                        list.Clear();

                        // the first byte is the mode, the rest is the string.
                        if (count > 1)
                        {
                            m_Test = System.Text.Encoding.UTF8.GetString(saveBytes, 1, count - 1);
                            for (int i = 0; m_Test.Length > i; ++i)
                            {
                                char Letter = m_Test.ElementAt(i);

                                if (Letter.ToString() == "a")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "b")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "c")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "d")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "e")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                            }
                        }

                        fs.Close();

                        if (list.Count < 4)
                        {
                            list.Add(000000);
                            list.Add(000000);
                            list.Add(000000);
                            list.Add(000000);
                            list.Add(000000);
                        }
                    }
                }

                else
                {
                    if (list.Count < 4)
                    {
                        list.Add(00000);
                        list.Add(00000);
                        list.Add(00000);
                        list.Add(00000);
                        list.Add(00000);
                    }
                }
                return list;
            }

            else if (Filename == "FishesSurvival")
            {
                if (savegameStorage.FileExists(Filename + ".txt"))
                {
                    IsolatedStorageFileStream fs = null;
                    fs = savegameStorage.OpenFile(Filename + ".txt", System.IO.FileMode.Open);

                    if (fs != null)
                    {
                        // Reload the last state of the game.  This consists of the UI mode
                        // and any text that was typed on the keyboard input screen. 
                        byte[] saveBytes = new byte[256];
                        int count = fs.Read(saveBytes, 0, 256);
                        list.Clear();

                        // the first byte is the mode, the rest is the string.
                        if (count > 1)
                        {
                            m_Test = System.Text.Encoding.UTF8.GetString(saveBytes, 1, count - 1);
                            for (int i = 0; m_Test.Length > i; ++i)
                            {
                                char Letter = m_Test.ElementAt(i);

                                if (Letter.ToString() == "a")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "b")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "c")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "d")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "e")
                                {
                                    string score = "0";
                                    for (int t = 0; 6 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                            }
                        }

                        fs.Close();

                        if (list.Count < 4)
                        {
                            list.Add(000000);
                            list.Add(000000);
                            list.Add(000000);
                            list.Add(000000);
                            list.Add(000000);
                        }
                    }
                }

                else
                {
                    if (list.Count < 4)
                    {
                        list.Add(00000);
                        list.Add(00000);
                        list.Add(00000);
                        list.Add(00000);
                        list.Add(00000);
                    }
                }
                return list;
            }

            else
            {
                if (savegameStorage.FileExists(Filename + ".txt"))
                {
                    IsolatedStorageFileStream fs = null;
                    fs = savegameStorage.OpenFile(Filename + ".txt", System.IO.FileMode.Open);

                    if (fs != null)
                    {
                        // Reload the last state of the game.  This consists of the UI mode
                        // and any text that was typed on the keyboard input screen. 
                        byte[] saveBytes = new byte[256];
                        int count = fs.Read(saveBytes, 0, 256);
                        list.Clear();

                        // the first byte is the mode, the rest is the string.
                        if (count > 1)
                        {
                            m_Test = System.Text.Encoding.UTF8.GetString(saveBytes, 1, count - 1);
                            for (int i = 0; m_Test.Length > i; ++i)
                            {
                                char Letter = m_Test.ElementAt(i);

                                if (Letter.ToString() == "a")
                                {
                                    string score = "0";
                                    for (int t = 0; 4 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "b")
                                {
                                    string score = "0";
                                    for (int t = 0; 4 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "c")
                                {
                                    string score = "0";
                                    for (int t = 0; 4 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "d")
                                {
                                    string score = "0";
                                    for (int t = 0; 4 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                                if (Letter.ToString() == "e")
                                {
                                    string score = "0";
                                    for (int t = 0; 4 > t; ++t)
                                    {
                                        if (score == "0") score = m_Test.ElementAt(i + t + 1).ToString();
                                        else score = score + m_Test.ElementAt(i + t + 1).ToString();
                                    }

                                    list.Add(Convert.ToInt32(score));
                                }
                            }
                        }

                        fs.Close();

                        if (list.Count < 4)
                        {
                            list.Add(0000);
                            list.Add(0000);
                            list.Add(0000);
                            list.Add(0000);
                            list.Add(0000);
                        }
                    }
                }

                else
                {
                    if (list.Count < 4)
                    {
                        list.Add(0000);
                        list.Add(0000);
                        list.Add(0000);
                        list.Add(0000);
                        list.Add(0000);
                    }
                }
                return list;
            }
        }

        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            Font1 = Content.Load<SpriteFont>("Times New Roman");
            FontPos = new Vector2(GraphicsDevice.Viewport.Width / 2, GraphicsDevice.Viewport.Height / 2);
            m_Menu = Content.Load<Texture2D>(@"menu's/INT2_MainMenu");
            m_ContinueButton = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_Continue");
            m_RestartButton = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_Retry");
            m_StartButton = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_Start");
            m_QuitButton = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_Quit");
            m_Hints = Content.Load<Texture2D>(@"menu's/Level1Slide");
            m_VictoryScreen = Content.Load<Texture2D>(@"menu's/INT2_GameWonMenu");
            m_ComingSoon = Content.Load<Texture2D>(@"menu's/ComingSoon");
            m_ChoosYoureLevel = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsLevelSelect");
            m_StoryModeButton = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_StartStory");
            m_HighScoreButton = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_Highscores");
            m_BackButton = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_Back");
            m_texMainMenuOil = Content.Load<Texture2D>(@"Backgrounds\V2\Float_OilTiledAnimatedSprite_V3");
            m_StoryModeScreenButtonTex = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_Story"); ;
            m_SurvivalModeButtonTex = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_Survival"); ;
            m_HardmodeButtontex = Content.Load<Texture2D>(@"Button's/INT2_HUD_ButtonsNEW_Hard");
            m_HighscoreTex = Content.Load<Texture2D>(@"Menu's\INT2_HighScores");

            m_Tutorials = new List<Texture2D>();
            m_StorySlides = new List<Texture2D>();

            Texture2D temp = Content.Load<Texture2D>(@"Tutorial and Story/HowToPlay_Seagulls_1_3");
            m_Tutorials.Add(temp);
            temp = Content.Load<Texture2D>(@"Tutorial and Story/HowToPlay_Seagulls_2_3");
            m_Tutorials.Add(temp);
            temp = Content.Load<Texture2D>(@"Tutorial and Story/HowToPlay_Seagulls_3_3");
            m_Tutorials.Add(temp);

            temp = Content.Load<Texture2D>(@"Tutorial and Story/HowToPlay_Fishes_1_2");
            m_Tutorials.Add(temp);
            temp = Content.Load<Texture2D>(@"Tutorial and Story/HowToPlay_Fishes_2_2");
            m_Tutorials.Add(temp);

            temp = Content.Load<Texture2D>(@"Tutorial and Story/HowToPlay_Humans_1_2");
            m_Tutorials.Add(temp);
            temp = Content.Load<Texture2D>(@"Tutorial and Story/HowToPlay_Humans_2_2");
            m_Tutorials.Add(temp);

            temp = Content.Load<Texture2D>(@"Tutorial and Story/INT2_Intro_Background");
            m_StorySlides.Add(temp);
            temp = Content.Load<Texture2D>(@"Tutorial and Story/INT2_Intro_Background_Fish");
            m_StorySlides.Add(temp);
            temp = Content.Load<Texture2D>(@"Tutorial and Story/INT2_Intro_Background_Humans");
            m_StorySlides.Add(temp);        

            m_RestartBB = new BoundingBox(new Vector3(400 - m_StartButton.Width / 2, 200, 0),
                                          new Vector3(400 + m_StartButton.Width / 2, 200 + m_StartButton.Height/2, 0));
            m_StartBB = new BoundingBox(new Vector3(400 - m_StartButton.Width / 2, 200, 0),
                                        new Vector3(400 + m_StartButton.Width / 2, 200 + m_StartButton.Height / 2, 0));
            //m_StartBB = new ImageCollision(this);
            //m_StartBB.Initialize(m_StartButton);
            m_QuitBB = new BoundingBox(new Vector3(400 - m_StartButton.Width / 2, 300, 0),
                                        new Vector3(400 + m_StartButton.Width / 2, 300 + m_StartButton.Height / 2, 0)); ;
           
            m_ContinueBB = new BoundingBox(new Vector3(400 - m_StartButton.Width/2, 100, 0),
                                           new Vector3(400 + m_StartButton.Width / 2, 100 + m_StartButton.Height / 2, 0)); ;

           m_Stage1 = new BoundingBox(new Vector3((200 - m_ChoosYoureLevel.Width / 4) + 70, 320, 0),
                                          new Vector3((400 - m_ChoosYoureLevel.Width / 4) + 70, 320 + (m_StartButton.Height / 1.5f), 0));

           m_Stage2 = new BoundingBox(new Vector3((400 - m_ChoosYoureLevel.Width / 4) + 70, 320, 0),
                                         new Vector3((600 - m_ChoosYoureLevel.Width / 4) + 70, 320 + (m_StartButton.Height / 1.5f), 0));

           m_Stage3 = new BoundingBox(new Vector3((600 - m_ChoosYoureLevel.Width / 4) + 70, 320, 0),
                                         new Vector3((800 - m_ChoosYoureLevel.Width / 4) + 70, 320 + (m_StartButton.Height / 1.5f), 0));

           m_HighscoreBB = new BoundingBox(new Vector3(630, 400, 0), new Vector3(630 + m_HighScoreButton.Width, 400 + m_HighScoreButton.Height / 2, 0));

           m_StoryModeBB = new BoundingBox(new Vector3(200 - m_StartButton.Width / 2, 200, 0),
                                             new Vector3(200 + m_StartButton.Width / 2, 200 + m_StartButton.Height / 2, 0));

           m_SurvivalModeBB = new BoundingBox(new Vector3(600 - m_StartButton.Width / 2, 200, 0),
                                                new Vector3(600 + m_StartButton.Width / 2, 200 + m_StartButton.Height / 2, 0));
           m_HardmodeBB = new BoundingBox(new Vector3(0, 10, 0),
                                               new Vector3(m_HardmodeButtontex.Width, m_HardmodeButtontex.Height/2+10, 0));

            // TODO: use this.Content to load your game content here
        }

        protected override void UnloadContent()
        {
            // TODO: Unload any non ContentManager content here
        }
   
        protected override void Update(GameTime gameTime)
        {


            // Allows the game to exit
                if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed && m_InGame == true)
                    PauzeMenu();

                while (TouchPanel.IsGestureAvailable)
                {
                    GestureSample gs = TouchPanel.ReadGesture();
                    if (gs.GestureType == GestureType.FreeDrag)
                    {
                        CheckForFreeDragCollision(gs.Position, gs.Delta, gameTime);
                    }

                    if (gs.GestureType == GestureType.Tap)
                    {
                        CheckForTapCollision(gs.Position);
                    }
                }

            if (m_InGame == true && m_Pauzed == false)
            {
                if (m_LevelNuber == 1)
                {
                    if (m_SurvivalMode == false) m_SeagullLevel.Update(gameTime);
                    else m_SeagullLevelSurvival.Update(gameTime);
                }

                if (m_LevelNuber == 2)
                {
                    if (m_SurvivalMode == false) m_FishLevel.Update(gameTime);
                    else m_FishLevelSurvival.Update(gameTime);                 
                }

                if (m_LevelNuber == 3)
                {
                    m_HumanLevel.Update(gameTime);
                    if (m_BeatReader.isPowerupInfinite())
                    {
                        m_HumanLevel.Infinity();
                    }
                }
                m_BeatReader.Update(gameTime);   
            }

            m_Eventhandler.Update(gameTime);
            
            base.Update(gameTime);

            if (m_TimeDelay >= 1) m_TimeDelay -= gameTime.ElapsedGameTime.Milliseconds;
        }

        void CheckForFreeDragCollision(Vector2 position, Vector2 velocity, GameTime gameTime)
        {
            BoundingBox bbG = new BoundingBox(new Vector3(position.X - TAP_TOLERANCE, position.Y - TAP_TOLERANCE, 0),
                                              new Vector3(position.X + TAP_TOLERANCE, position.Y + TAP_TOLERANCE, 0));

            if (m_InGame == true)
            {
                m_Eventhandler.AddSwipedStripe((int)position.X, (int)position.Y, velocity);

                if (m_LevelNuber == 1)
                {
                    if (m_SurvivalMode == false)
                    {
                        m_SeagullList = m_SeagullLevel.GetSeagullList;

                        foreach (Seagull seagull in m_SeagullList)
                        {
                            BoundingBox bbi = seagull.Boundingbox;

                            if (bbi.Intersects(bbG) && m_SwipeOnly1 == false && seagull.HasbeenSwiped == false)
                            {
                                if (seagull.IsFlyingIn == true && velocity.Y < 0)
                                {
                                    seagull.AddStrenght(110, m_Eventhandler);
                                    seagull.HasbeenSwiped = true;
                                    seagull.Velocity = velocity * 1.5f;
                                }

                                else if (velocity.Y < 0)
                                {
                                    float strenght = m_BeatReader.Strenght;

                                    if (strenght >= 100)
                                    {
                                        seagull.AddStrenght(100, m_Eventhandler);
                                        m_BeatReader.AddStrenght(-100);
                                    }

                                    else
                                    {
                                        seagull.AddStrenght(strenght, m_Eventhandler);
                                        m_BeatReader.AddStrenght(-m_BeatReader.Strenght);
                                    }

                                    m_SwipeOnly1 = true;

                                    velocity.Normalize();

                                    if (seagull.Strenght == 0) ;
                                    else if (seagull.Strenght < 20) seagull.Velocity = velocity * 1.5f;
                                    else if (seagull.Strenght < 40) seagull.Velocity = velocity * 3;
                                    else if (seagull.Strenght < 50) seagull.Velocity = velocity * 6;
                                    else if (seagull.Strenght < 80) seagull.Velocity = velocity * 8;
                                    else seagull.Velocity = velocity * 8;

                                    seagull.HasbeenSwiped = true;
                                }
                            }
                        }
                    }

                    else 
                    { 
                        m_SeagullList = m_SeagullLevelSurvival.GetSeagullList;

                        foreach (Seagull seagull in m_SeagullList)
                        {
                            BoundingBox bbi = seagull.Boundingbox;

                            if (bbi.Intersects(bbG) && m_SwipeOnly1 == false && seagull.HasbeenSwiped == false)
                            {
                                if (seagull.IsFlyingIn == true && velocity.Y < 0)
                                {
                                    seagull.AddStrenght(110, m_Eventhandler);
                                    seagull.HasbeenSwiped = true;
                                    seagull.Velocity = velocity * 1.5f;
                                }

                                else if (velocity.Y < 0)
                                {
                                    float strenght = m_BeatReader.Strenght;

                                    if (strenght >= 100)
                                    {
                                        seagull.AddStrenght(100, m_Eventhandler);
                                        m_BeatReader.AddStrenght(-100);
                                    }

                                    else
                                    {
                                        seagull.AddStrenght(strenght, m_Eventhandler);
                                        m_BeatReader.AddStrenght(-m_BeatReader.Strenght);
                                    }

                                    m_SwipeOnly1 = true;

                                    velocity.Normalize();

                                    if (seagull.Strenght == 0) ;
                                    else if (seagull.Strenght < 20) seagull.Velocity = velocity * 1.5f;
                                    else if (seagull.Strenght < 40) seagull.Velocity = velocity * 3;
                                    else if (seagull.Strenght < 50) seagull.Velocity = velocity * 6;
                                    else if (seagull.Strenght < 80) seagull.Velocity = velocity * 8;
                                    else seagull.Velocity = velocity * 8;

                                    seagull.HasbeenSwiped = true;
                                }
                            }
                        }
                    }
                }

                if (m_LevelNuber == 2)
                {
                    if (m_SurvivalMode == false)
                    {
                        m_FishList = m_FishLevel.GetFishList;

                        foreach (Fish fish in m_FishList)
                        {
                            BoundingBox bbi = fish.Boundingbox;

                            if (bbi.Intersects(bbG))
                            {
                                float strenght = m_BeatReader.Strenght;

                                if (strenght >= 100 && m_TimeDelay <= 0)
                                {
                                    if (!(velocity.Y == 0 && velocity.X == 0))
                                    {
                                        //m_SwipeOnly1 = true;
                                        m_BeatReader.AddStrenght(-100);

                                        velocity.Normalize();

                                        fish.Velocity = velocity * 9;

                                        fish.HasbeenSwiped = true;

                                        m_TimeDelay = 100;
                                    }
                                }
                            }
                        }
                    }

                    else
                    {
                        m_FishList = m_FishLevelSurvival.GetFishList;

                        foreach (Fish fish in m_FishList)
                        {
                            BoundingBox bbi = fish.Boundingbox;

                            if (bbi.Intersects(bbG))
                            {
                                float strenght = m_BeatReader.Strenght;

                                if (strenght >= 100 && m_TimeDelay <= 0)
                                {
                                    if (!(velocity.Y == 0 && velocity.X == 0))
                                    {
                                        //m_SwipeOnly1 = true;
                                        m_BeatReader.AddStrenght(-100);

                                        velocity.Normalize();

                                        fish.Velocity = velocity * 9;

                                        fish.HasbeenSwiped = true;

                                        m_TimeDelay = 100;
                                    }
                                }
                            }
                        }
                    }
                }

                if (m_LevelNuber == 3)
                {
                    m_HumanLevel.MoveBoat(velocity);
                    m_BeatReader.Strenght = (int)m_HumanLevel.StainHealth();
                }
            }       
            m_SwipeOnly1 = false;
        }

        void CheckForTapCollision(Vector2 position)
        {
            BoundingBox bbG = new BoundingBox(new Vector3(position.X - TAP_TOLERANCE, position.Y - TAP_TOLERANCE, 0),
                                              new Vector3(position.X - TAP_TOLERANCE, position.Y + TAP_TOLERANCE, 0));
            bool onlyonce = false;

            if (m_InGame == true && m_Pauzed == false)
            {

                int str = m_BeatReader.Tapped();
                if (m_LevelNuber == 3)
                {
                    m_HumanLevel.Cleanoil(str);
                    m_BeatReader.Strenght = (int)(m_HumanLevel.StainHealth());
                }
                else
                    m_BeatReader.AddStrenght(str);
                    
            }

            if (m_bTutorial == true)
            {
                m_Musicmanager.pause(true);

                if (m_LevelNuber == 1)
                {
                    if (m_TutorialTeller == 1) ++m_TutorialTeller;
                    else if (m_TutorialTeller == 2) ++m_TutorialTeller;
                    else if (m_TutorialTeller == 3)
                    {                       
                        StartLevel1();
                        m_bTutorial = false;
                    }
                }

                if (m_LevelNuber == 2)
                {
                    if (m_TutorialTeller == 1) ++m_TutorialTeller;
                    else if (m_TutorialTeller == 2)
                    {
                        StartLevel2();
                        m_bTutorial = false;
                    }
                }

                if (m_LevelNuber == 3)
                {
                    if (m_TutorialTeller == 1) ++m_TutorialTeller;
                    else if (m_TutorialTeller == 2)
                    {
                        StartLevel3();
                        m_bTutorial = false;
                    }
                }
            }

            if (m_bStory == true)
            {
                m_bStory = false;
                m_bTutorial = true;
                m_TutorialTeller = 1;
            }

            if (m_ShowChooseLevel == true)
            {
                if (m_Stage1.Intersects(bbG))
                {
                    m_LevelNuber = 1;
                    m_ShowChooseLevel = false;
                    m_bStory = true;
                    m_StoryMode = false;
                    m_StorySlider = 0;
                    m_SurvivalMode = false;
                }

                if (m_Stage2.Intersects(bbG))
                {
                    m_LevelNuber = 2;
                    m_ShowChooseLevel = false;
                    m_bStory = true;
                    m_StoryMode = false;
                    m_StorySlider = 0;
                    m_SurvivalMode = false;
                }

                if (m_Stage3.Intersects(bbG))
                {
                    m_LevelNuber = 3;
                    m_ShowChooseLevel = false;
                    m_bStory = true;
                    m_StoryMode = false;
                    m_StorySlider = 480;
                    m_SurvivalMode = false;
                }

                if (m_StartBB.Intersects(bbG))
                {
                    m_StoryMode = true;
                    m_LevelNuber = 1;
                    m_ShowChooseLevel = false;
                    StartLevel1();
                    m_bStory = true;
                    m_StorySlider = 0;
                    m_InGame = false;
                }
            }

            if (m_SurvivalModeScreen == true)
            {
                if (m_Stage1.Intersects(bbG))
                {
                    m_LevelNuber = 1;
                    m_SurvivalModeScreen = false;
                    m_bStory = true;
                    m_StoryMode = false;
                    m_StorySlider = 0;
                    m_SurvivalMode = true;
                }

                if (m_Stage3.Intersects(bbG))
                {
                    m_LevelNuber = 2;
                    m_SurvivalModeScreen = false;
                    m_bStory = true;
                    m_StoryMode = false;
                    m_StorySlider = 0;
                    m_SurvivalMode = true;
                }              
            }

            if (m_HighscoreMenu == true && onlyonce == false)
            {
                if (m_HighscoreBB.Intersects(bbG))
                {
                    m_HighscoreMenu = false;
                    m_showMainMenu = true;
                    onlyonce = true;

                }
                else
                {
                    ++m_NumberHighscore;
                    if (m_NumberHighscore > 3) m_NumberHighscore = 1;
                }
            }

            if (m_showMainMenu == true && onlyonce == false)
            {
                if( m_HardmodeBB.Intersects(bbG))
                {
                    if (m_Hardmode)
                        m_Hardmode = false;
                    else
                        m_Hardmode = true;
                }

                if (m_StoryModeBB.Intersects(bbG))
                {
                    m_Eventhandler.SFXPing();

                    m_ShowChooseLevel = true;
                    m_showMainMenu = false;
                }

                if (m_SurvivalModeBB.Intersects(bbG))
                {
                    m_Eventhandler.SFXSeagullcry();

                    m_SurvivalModeScreen = true;
                    m_showMainMenu = false;
                }

                if (m_QuitBB.Intersects(bbG))
                {
                    this.Exit();
                }
                if (m_HighscoreBB.Intersects(bbG))
                {
                    m_Eventhandler.SFXSSplash();
                    m_HighscoreMenu = true;
                    m_showMainMenu = false;
                    onlyonce = true;
                }
            }

            if(m_Pauzed == true)
            {
                if (m_ContinueBB.Intersects(bbG))
                {
                    m_Pauzed = false;
                    m_BeatReader.Pause(false);
                }
                if (m_RestartBB.Intersects(bbG))
                {
                    RestartLevel();
                    m_Pauzed = false;
                    m_BeatReader.ResetSong();
                }
                if (m_QuitBB.Intersects(bbG))
                {
                    m_Pauzed = false;
                    m_InGame = false;
                    m_showMainMenu = true;
                    m_Musicmanager.PlayMainMenu();
                }
            }

            if (m_GameOver == true)
            {
                if (m_Delay >= 2000)
                {
                    m_GameOver = false;
                    RestartLevel();
                    m_InGame = true;
                }
            }

            if (m_Victory == true)
            {
                if (m_Delay >= 2000)
                {
                    if(m_StoryMode == true)
                    {
                        if (m_Level3Completed == false && m_Level2Completed == true)
                        {
                            m_Victory = false;
                            m_showMainMenu = true;
                            m_Musicmanager.PlayMainMenu();
                        }

                        if (m_Level2Completed == false && m_Level1Completed == true)
                        {
                            m_Victory = false;
                            m_LevelNuber = 3;
                            m_bStory = true;
                            m_StorySlider = 0;
                        }

                        if (m_Level1Completed == false)
                        {
                            m_Level1Completed = true;
                            m_Victory = false;
                            m_LevelNuber = 2;
                            m_bStory = true;
                            m_StorySlider = 0;
                        }
                    }

                    if (m_StoryMode == false)
                    {
                        m_Musicmanager.PlayMainMenu();
                        if (m_LevelNuber == 1)
                        {
                            m_Victory = false;
                            m_showMainMenu = true;
                        }

                        if (m_LevelNuber == 2)
                        {
                            m_Victory = false;
                            m_showMainMenu = true;
                        }

                        if (m_LevelNuber == 3)
                        {
                            m_Victory = false;
                            m_showMainMenu = true;
                        }
                    }
                }
            }          
        }

        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();

            if (m_InGame == true)
            {
                if (m_LevelNuber == 1)
                {
                    if(m_SurvivalMode == false) m_SeagullLevel.Draw(gameTime, spriteBatch);
                    else m_SeagullLevelSurvival.Draw(gameTime, spriteBatch);

                }
                if (m_LevelNuber == 2) 
                {
                    if (m_SurvivalMode == false) m_FishLevel.Draw(gameTime, spriteBatch, graphics);
                    else m_FishLevelSurvival.Draw(gameTime, spriteBatch, graphics);
                }
                if (m_LevelNuber == 3) m_HumanLevel.Draw(spriteBatch, gameTime);

                m_BeatReader.Draw(gameTime, spriteBatch, Font1);

                if (m_Pauzed == true)
                {
                    spriteBatch.Draw(m_RestartButton, new Vector2(400 - m_RestartButton.Width / 2, 200),new Rectangle(0,0,m_RestartButton.Width,m_RestartButton.Height/2), Color.White);
                    spriteBatch.Draw(m_ContinueButton, new Vector2(400 - m_ContinueButton.Width / 2, 100), new Rectangle(0, 0, m_ContinueButton.Width, m_ContinueButton.Height / 2), Color.White);
                    spriteBatch.Draw(m_QuitButton, new Vector2(400 - m_QuitButton.Width / 2, 300), new Rectangle(0, 0, m_QuitButton.Width, m_QuitButton.Height / 2), Color.White);
                }
                //m_BeatReader.Draw(gameTime, spriteBatch, Font1);
            }

            if (m_showMainMenu == true)
            {
                spriteBatch.Draw(m_Menu,new Vector2(0, 0), Color.White);

                if(!m_Hardmode)
                    spriteBatch.Draw(m_HardmodeButtontex, new Rectangle((int)m_HardmodeBB.Min.X, (int)m_HardmodeBB.Min.Y, m_HardmodeButtontex.Width, m_HardmodeButtontex.Height / 2), new Rectangle(0, 0, m_HardmodeButtontex.Width, m_HardmodeButtontex.Height/2), Color.White);
                else
                    spriteBatch.Draw(m_HardmodeButtontex, new Rectangle((int)m_HardmodeBB.Min.X, (int)m_HardmodeBB.Min.Y, m_HardmodeButtontex.Width, m_HardmodeButtontex.Height / 2), new Rectangle(0, m_HardmodeButtontex.Height/2, m_HardmodeButtontex.Width, m_HardmodeButtontex.Height/2), Color.White);

                m_oiltickdelay++;
                if (m_oiltickdelay >= 2)
                {
                    m_oiltick++;
                    m_oiltickdelay = 0;
                    if (m_oiltick >= 18)
                        m_oiltick = 0;
                }
                spriteBatch.Draw(m_texMainMenuOil, new Rectangle(0, Window.ClientBounds.Width - m_texMainMenuOil.Height / 18, m_texMainMenuOil.Width, m_texMainMenuOil.Height / 18), new Rectangle(0, m_oiltick * m_texMainMenuOil.Height / 18, m_texMainMenuOil.Width, m_texMainMenuOil.Height / 18), Color.White);
                
                spriteBatch.Draw(m_QuitButton, new Vector2(400 - m_QuitButton.Width / 2, 300), new Rectangle(0, 0, m_QuitButton.Width, m_QuitButton.Height / 2), Color.White);

                spriteBatch.Draw(m_StoryModeScreenButtonTex, new Vector2(200 - m_StartButton.Width / 2, 200), new Rectangle(0, 0, m_StartButton.Width, m_StartButton.Height / 2), Color.White);
                spriteBatch.Draw(m_SurvivalModeButtonTex, new Vector2(600 - m_StartButton.Width / 2, 200), new Rectangle(0, 0, m_StartButton.Width, m_StartButton.Height / 2), Color.White);

                spriteBatch.Draw(m_HighScoreButton, new Rectangle((int)m_HighscoreBB.Min.X, (int)m_HighscoreBB.Min.Y, (int)m_HighScoreButton.Width / 2, (int)m_HighScoreButton.Height / 4), new Rectangle(0, 0, m_HighScoreButton.Width, m_HighScoreButton.Height / 2), Color.White);
            }

            if (m_ShowChooseLevel == true)
            {
                spriteBatch.Draw(m_Menu, new Vector2(0, 0), Color.White);
                spriteBatch.Draw(m_StoryModeButton, new Rectangle(400 - m_StartButton.Width / 2, 200, m_StoryModeButton.Width, m_StoryModeButton.Height/2),
                    new Rectangle(0, 0, m_StoryModeButton.Width, m_StoryModeButton.Height/2), Color.White);
                spriteBatch.Draw(m_ChoosYoureLevel, new Rectangle((400 - m_ChoosYoureLevel.Width / 4) + 70, 320, (int)(m_StartButton.Width / 1.5f), (int)(m_StartButton.Height / 1.5f)), 
                    new Rectangle(0, (m_ChoosYoureLevel.Height/3), m_ChoosYoureLevel.Width/2, m_ChoosYoureLevel.Height/3), Color.White);
                spriteBatch.Draw(m_ChoosYoureLevel, new Rectangle((200 - m_ChoosYoureLevel.Width / 4) + 70, 320, (int)(m_StartButton.Width / 1.5f), (int)(m_StartButton.Height / 1.5f)),
                    new Rectangle(0, 0, m_ChoosYoureLevel.Width / 2, m_ChoosYoureLevel.Height / 3), Color.White);
                spriteBatch.Draw(m_ChoosYoureLevel, new Rectangle((600 - m_ChoosYoureLevel.Width / 4) + 70, 320, (int)(m_StartButton.Width / 1.5f), (int)(m_StartButton.Height / 1.5f)),
                    new Rectangle(0, (m_ChoosYoureLevel.Height / 3) * 2, m_ChoosYoureLevel.Width / 2, m_ChoosYoureLevel.Height / 3), Color.White);                
            }


            if (m_SurvivalModeScreen == true)
            {
                spriteBatch.Draw(m_Menu, new Vector2(0, 0), Color.White);
                spriteBatch.Draw(m_ChoosYoureLevel, new Rectangle((200 - m_ChoosYoureLevel.Width / 4) + 70, 320, (int)(m_StartButton.Width / 1.5f), (int)(m_StartButton.Height / 1.5f)),
                    new Rectangle(0, 0, m_ChoosYoureLevel.Width / 2, m_ChoosYoureLevel.Height / 3), Color.White);

                spriteBatch.Draw(m_ChoosYoureLevel, new Rectangle((600 - m_ChoosYoureLevel.Width / 4) + 70, 320, (int)(m_StartButton.Width / 1.5f), (int)(m_StartButton.Height / 1.5f)),
                   new Rectangle(0, (m_ChoosYoureLevel.Height / 3), m_ChoosYoureLevel.Width / 2, m_ChoosYoureLevel.Height / 3), Color.White);            
            }

            if (m_GameOver == true)
            { 
                spriteBatch.Draw(m_GameOverscreen, new Vector2(0, 0), Color.White);
                m_Delay += gameTime.ElapsedGameTime.Milliseconds;
            }

            if (m_HighscoreMenu == true)
            {
                if (m_NumberHighscore == 1)
                {
                    spriteBatch.Draw(m_Menu, new Vector2(0, 0), Color.White);

                    spriteBatch.Draw(m_HighscoreTex, new Rectangle((Window.ClientBounds.Height / 2) - (m_HighscoreTex.Width / 2) + 170, 200, (m_HighscoreTex.Width / 2), (m_HighscoreTex.Height / 5))
                                                    , new Rectangle(0, 0, m_HighscoreTex.Width, 84), Color.White);
                    //84 pixels hoog
                    //+59* i

                    spriteBatch.Draw(m_HighscoreTex, new Rectangle((Window.ClientBounds.Height / 2) - (m_HighscoreTex.Width / 4) - 80, 270, (m_HighscoreTex.Width / 4), (m_HighscoreTex.Height / 10))
                                                    , new Rectangle(0, 84 + 59, m_HighscoreTex.Width / 2 - 20, 59), Color.White);

                    for (int i = 0; m_HighScoreFishes.Count > i; ++i)
                    {
                        String s = "" + m_HighScoreFishes.ElementAt(i);
                        spriteBatch.DrawString(Font1, s, new Vector2(400, (20 * i) + 300), Color.Black);
                    }

                    spriteBatch.Draw(m_HighscoreTex, new Rectangle((Window.ClientBounds.Height / 2) - (m_HighscoreTex.Width / 4) + 120, 270, (m_HighscoreTex.Width / 4), (m_HighscoreTex.Height / 10))
                                                    , new Rectangle(0, 84, m_HighscoreTex.Width / 2 - 20, 59), Color.White);

                    for (int i = 0; m_HighScoreSeagulls.Count > i; ++i)
                    {
                        String s = "" + m_HighScoreSeagulls.ElementAt(i);
                        spriteBatch.DrawString(Font1, s, new Vector2(200, (20 * i) + 300), Color.Black);
                    }

                    spriteBatch.Draw(m_HighscoreTex, new Rectangle((Window.ClientBounds.Height / 2) - (m_HighscoreTex.Width / 4) + 320, 270, (m_HighscoreTex.Width / 4), (m_HighscoreTex.Height / 10))
                                                   , new Rectangle(0, 84 + (59 * 2), m_HighscoreTex.Width / 2 - 20, 59), Color.White);

                    for (int i = 0; m_HighScoreHuman.Count > i; ++i)
                    {
                        String s = "" + m_HighScoreHuman.ElementAt(i);
                        spriteBatch.DrawString(Font1, s, new Vector2(600, (20 * i) + 300), Color.Black);
                    }
                }

                if (m_NumberHighscore == 2)
                {
                    spriteBatch.Draw(m_Menu, new Vector2(0, 0), Color.White);

                    spriteBatch.Draw(m_HighscoreTex, new Rectangle((Window.ClientBounds.Height / 2) - (m_HighscoreTex.Width / 2) + 170, 200, (m_HighscoreTex.Width / 2), (m_HighscoreTex.Height / 5))
                                                    , new Rectangle(0, 0, m_HighscoreTex.Width, 84), Color.White);
                    //84 pixels hoog
                    //+59* i

                    spriteBatch.Draw(m_HighscoreTex, new Rectangle((Window.ClientBounds.Height / 2) - (m_HighscoreTex.Width / 4) + 120, 270, (m_HighscoreTex.Width / 4), (m_HighscoreTex.Height / 10))
                                                    , new Rectangle(0, 84 + (59 * 3), m_HighscoreTex.Width / 2 - 20, 59), Color.White);

                    for (int i = 0; m_HighScoreStory.Count > i; ++i)
                    {
                        String s = "" + m_HighScoreStory.ElementAt(i);
                        spriteBatch.DrawString(Font1, s, new Vector2(400, (20 * i) + 300), Color.Black);
                    }
                }

                if (m_NumberHighscore == 3)
                {
                    spriteBatch.Draw(m_Menu, new Vector2(0, 0), Color.White);

                    spriteBatch.Draw(m_HighscoreTex, new Rectangle((Window.ClientBounds.Height / 2) - (m_HighscoreTex.Width / 2) + 170, 200, (m_HighscoreTex.Width / 2), (m_HighscoreTex.Height / 5))
                                                    , new Rectangle(0, 0, m_HighscoreTex.Width, 84), Color.White);
                    //84 pixels hoog
                    //+59* i

                    spriteBatch.Draw(m_HighscoreTex, new Rectangle((Window.ClientBounds.Height / 2) - (m_HighscoreTex.Width / 4) - 80, 270, (m_HighscoreTex.Width / 4), (m_HighscoreTex.Height / 10))
                                                                        , new Rectangle(m_HighscoreTex.Width / 2 - 20, 84, m_HighscoreTex.Width / 2 - 20, 59), Color.White);

                    for (int i = 0; m_HighScoreSeagullsSurvival.Count > i; ++i)
                    {
                        String s = "" + m_HighScoreSeagullsSurvival.ElementAt(i);
                        spriteBatch.DrawString(Font1, s, new Vector2(200, (20 * i) + 300), Color.Black);
                    }

                    spriteBatch.Draw(m_HighscoreTex, new Rectangle((Window.ClientBounds.Height / 2) - (m_HighscoreTex.Width / 4) + 320, 270, (m_HighscoreTex.Width / 4), (m_HighscoreTex.Height / 10))
                                                   , new Rectangle(m_HighscoreTex.Width / 2 - 20, 84 + 59, m_HighscoreTex.Width / 2 - 20, 59), Color.White);

                    for (int i = 0; m_HighScoreFishesSurvival.Count > i; ++i)
                    {
                        String s = "" + m_HighScoreFishesSurvival.ElementAt(i);
                        spriteBatch.DrawString(Font1, s, new Vector2(600, (20 * i) + 300), Color.Black);
                    }
                }

                spriteBatch.Draw(m_BackButton, new Rectangle(630, 400, m_HighScoreButton.Width / 2, m_HighScoreButton.Height / 4),
                   new Rectangle(0, 0, m_HighScoreButton.Width, m_HighScoreButton.Height / 2), Color.White);
            }

            if (m_bTutorial == true)
            {
                if (m_LevelNuber == 1)
                {
                    if (m_TutorialTeller == 1)
                    {
                        spriteBatch.Draw(m_Tutorials.ElementAt(0), new Vector2(0, 0), Color.White);
                    }

                    if (m_TutorialTeller == 2)
                    {
                        spriteBatch.Draw(m_Tutorials.ElementAt(1), new Vector2(0, 0), Color.White);
                    }

                    if (m_TutorialTeller == 3)
                    {
                        spriteBatch.Draw(m_Tutorials.ElementAt(2), new Vector2(0, 0), Color.White);
                    }
                }

                if (m_LevelNuber == 2)
                {
                    if (m_TutorialTeller == 1)
                    {
                        spriteBatch.Draw(m_Tutorials.ElementAt(3), new Vector2(0, 0), Color.White);
                    }

                    if (m_TutorialTeller == 2)
                    {
                        spriteBatch.Draw(m_Tutorials.ElementAt(4), new Vector2(0, 0), Color.White);
                    }
                }

                if (m_LevelNuber == 3)
                {
                    if (m_TutorialTeller == 1)
                    {
                        spriteBatch.Draw(m_Tutorials.ElementAt(5), new Vector2(0, 0), Color.White);
                    }

                    if (m_TutorialTeller == 2)
                    {
                        spriteBatch.Draw(m_Tutorials.ElementAt(6), new Vector2(0, 0), Color.White);
                    }
                }
            }

            if (m_bStory == true)
            {
                if (m_LevelNuber == 1)
                {
                    spriteBatch.Draw(m_StorySlides.ElementAt(0), new Rectangle(0, 0, 800, 480),
                        new Rectangle((int)(m_StorySlider), 0, 800, 480), Color.White);

                    if (m_StorySlider < 800) m_StorySlider += 2f;

                }

                if (m_LevelNuber == 2)
                {
                    spriteBatch.Draw(m_StorySlides.ElementAt(1), new Rectangle(0, 0, 800, 480),
                        new Rectangle(0, (int)(m_StorySlider), 800, 480), Color.White);

                    if (m_StorySlider < 937) m_StorySlider += 2f;
                }

                if (m_LevelNuber == 3)
                {
                    spriteBatch.Draw(m_StorySlides.ElementAt(2), new Rectangle(0, 0, 800, 480),
                        new Rectangle(0, (int)(m_StorySlider), 800, 480), Color.White);

                    if (m_StorySlider > 0) m_StorySlider -= 2f;
                }
            }


            if (m_Victory == true)
            {
                spriteBatch.Draw(m_VictoryScreen, new Vector2(0, 0), Color.White);

                if (m_LevelNuber == 1)
                {
                    if (m_SurvivalMode == false)
                    {
                        string output = "Time = " + m_SeagullLevel.Time / 1000 + "    Score = " + (int)(5000 - (m_SeagullLevel.Time / 50));
                        Vector2 FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 200), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);

                        output = "Seagulls lost = " + m_SeagullLevel.deadSeagulls + "    Penalty = " + (int)(-(m_SeagullLevel.deadSeagulls * 500));
                        FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 250), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);

                        output = "Final Score = " + (int)((5000 - (m_SeagullLevel.Time / 50)) - (m_SeagullLevel.deadSeagulls * 500));
                        FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 300), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);
                    }

                    else
                    {
                        string output = "Time = " + m_SeagullLevelSurvival.Time / 1000 + "    Score = " + (int)(m_SeagullLevelSurvival.Time / 100);
                        Vector2 FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 200), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);

                        output = "Seagulls Saved = " + m_SeagullLevelSurvival.SavedSeagulls + "    Score = " + (int)(m_SeagullLevelSurvival.SavedSeagulls * 50);
                        FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 250), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);

                        output = "Final Score = " + ((int)(m_SeagullLevelSurvival.Time /100) + (int)(m_SeagullLevelSurvival.SavedSeagulls * 50));
                        FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 300), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);
                    }
                }

                if (m_LevelNuber == 2)
                {
                    if (m_SurvivalMode == false)
                    {
                        string output = "Time = " + m_FishLevel.Time / 1000 + "    Score = " + (int)(5000 - (m_FishLevel.Time / 50));
                        Vector2 FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 200), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);

                        output = "Fishes Lost = " + m_FishLevel.DeadFish + "    Penalty = " + (int)(-(m_FishLevel.DeadFish * 500));
                        FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 250), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);

                        int score = (int)((5000 - (m_FishLevel.Time / 50)) - (m_FishLevel.DeadFish * 500));

                        output = "Final Score = " + score;
                        FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 300), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);
                    }

                    else 
                    {
                        string output = "Time = " + m_FishLevelSurvival.Time / 1000 + "    Score = " + (int)(m_FishLevelSurvival.Time / 100);
                        Vector2 FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 200), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);

                        output = "Fishes Saved = " + m_FishLevelSurvival.SavedFish + "    Score = " + (int)(m_FishLevelSurvival.SavedFish * 50);
                        FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 250), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);

                        int score = (int)((m_FishLevelSurvival.Time / 100) + (m_FishLevelSurvival.SavedFish * 20));

                        output = "Final Score = " + score;
                        FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 300), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);
                    }
                }

                if (m_LevelNuber == 3)
                {
                    if (m_LevelNuber == 3)
                    {
                        string output = "Score= " + (int)(m_HumanLevel.Score);
                        Vector2 FontOrigin = Font1.MeasureString(output) / 2;
                        FontOrigin.X -= 150;
                        spriteBatch.DrawString(Font1, output, new Vector2(100, 250), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);

                        int score = m_HumanLevel.Score;

                        if (m_StoryMode == true)
                        {
                            output = "Final Score = " + (score + m_ScoreSeagulls + m_ScoreFishes);
                            FontOrigin = Font1.MeasureString(output) / 2;
                            FontOrigin.X -= 150;
                            spriteBatch.DrawString(Font1, output, new Vector2(100, 300), Color.Black, 0, FontOrigin, 2.0f, SpriteEffects.None, 0.5f);
                        }
                    }
                }

                m_Delay += gameTime.ElapsedGameTime.Milliseconds;
            }

            if (m_bComingSoon == true)
            {
                spriteBatch.Draw(m_ComingSoon, new Vector2(0, 0), Color.White);
            }

            m_Eventhandler.Draw(gameTime, spriteBatch);

           

            spriteBatch.End();

            if (m_InGame == true)
            {
                if (m_LevelNuber == 1)
                {
                    if (m_SurvivalMode == false) m_SeagullLevel.draw3D(gameTime, graphics);
                    else m_SeagullLevelSurvival.draw3D(gameTime, graphics);

                }
                if (m_LevelNuber == 2)
                {
                    if (m_SurvivalMode == false) m_FishLevel.draw3D(gameTime, graphics);
                    else m_FishLevelSurvival.draw3D(gameTime, graphics);
                }

                if (m_LevelNuber == 3) m_HumanLevel.draw3D(gameTime, graphics);
            }

            spriteBatch.Begin();

            if (m_LevelNuber == 1 && m_InGame == true)
            {
                if (m_SurvivalMode == false) m_SeagullLevel.AfterDraw(gameTime, spriteBatch);
                else m_SeagullLevelSurvival.AfterDraw(gameTime, spriteBatch);
            }

            spriteBatch.End();

            base.Draw(gameTime);
        }

        public void ChangeScore(int Points)
        {
            Score += Points;
        }

        public void RestartLevel()
        {
            if (m_LevelNuber == 1) StartLevel1();
            if (m_LevelNuber == 2) StartLevel2();
            if (m_LevelNuber == 3) StartLevel3();
        }

        public void StartLevel1()
        {
            if (m_SurvivalMode == false)
            {
                m_InGame = true;
                m_SeagullLevel = new SeagullLevel(this, 7);

                m_BeatReader = new BeatReader(this);

                m_SeagullLevel.Initialize(Content, m_Eventhandler);
                m_BeatReader.Initialize(Content, m_Eventhandler, m_Musicmanager, this);
                m_BeatReader.setStageSeagull();
                
            }

            else 
            {
                m_InGame = true;
                m_SeagullLevelSurvival = new SeagullLevelSurvival(this, 7);

                m_BeatReader = new BeatReader(this);

                m_SeagullLevelSurvival.Initialize(Content, m_Eventhandler);
                m_BeatReader.Initialize(Content, m_Eventhandler, m_Musicmanager, this);
                m_BeatReader.setStageSeagull();
            }

            if (!m_Hardmode)
                m_BeatReader.SetSong1();
            else
                m_BeatReader.SetSong1Hard();
        }

        public void StartLevel2()
        {
            if (m_SurvivalMode == false)
            {
                m_InGame = true;
                m_FishLevel = new FishLevel(this, 4);
                m_BeatReader = new BeatReader(this);
                m_FishLevel.Initialize(Content,m_Eventhandler);
                m_BeatReader.Initialize(Content, m_Eventhandler, m_Musicmanager, this);
                m_BeatReader.setStageFish();
            }

            else
            {
                m_InGame = true;
                m_FishLevelSurvival = new FishLevelSurvival(this, 4);
                m_BeatReader = new BeatReader(this);
                m_FishLevelSurvival.Initialize(Content,m_Eventhandler);
                m_BeatReader.Initialize(Content, m_Eventhandler, m_Musicmanager, this);
                m_BeatReader.setStageFish();
            }
            if (!m_Hardmode)
                m_BeatReader.SetSong2();
            else
                m_BeatReader.SetSong2Hard();

        }

        public void StartLevel3()
        {
            m_InGame = true;

            m_HumanLevel = new HumanLevel(this);
            m_BeatReader = new BeatReader(this);

            m_HumanLevel.Initialize(Content, m_Eventhandler, GraphicsDevice);
            m_BeatReader.Initialize(Content, m_Eventhandler, m_Musicmanager, this);
            m_BeatReader.setStageHuman();

            if (!m_Hardmode)
                m_BeatReader.SetSong3();
            else
                m_BeatReader.SetSong3Hard();
        }

        public void GameOver()
        {
            int rand = generator.Next(1, 3);

            if (rand == 1) m_GameOverscreen = Content.Load<Texture2D>(@"menu's/INT2_GameOverMenu1");
            if (rand == 2) m_GameOverscreen = Content.Load<Texture2D>(@"menu's/INT2_GameOverMenu2");
            if (rand == 3) m_GameOverscreen = Content.Load<Texture2D>(@"menu's/INT2_GameOverMenu3");

            m_BeatReader.Pause(true);

            m_Musicmanager.PlayGameOVer();

            m_InGame = false;
            m_GameOver = true;
        }

        public void Victory()
        {
            m_InGame = false;
            m_Victory = true;
            m_BeatReader.Pause(true);
            m_Musicmanager.PlayVictory();
            if (m_LevelNuber == 1)
            {
                if (m_SurvivalMode == false)
                {
                    m_ScoreSeagulls = (int)((5000 - (m_SeagullLevel.Time / 50)) - (m_SeagullLevel.deadSeagulls * 500));

                    bool onlyonce = false;
                    for (int i = 0; m_HighScoreSeagulls.Count > i; ++i)
                    {
                        if (onlyonce == false)
                        {
                            if (m_HighScoreSeagulls.ElementAt(i) < m_ScoreSeagulls)
                            {
                                m_HighScoreSeagulls.Insert(i, m_ScoreSeagulls);
                                onlyonce = true;
                            }
                        }
                    }

                    saving("Seagulls");
                    m_HighScoreSeagulls = Loading("Seagulls", m_HighScoreSeagulls);
                }

                else
                {
                    m_ScoreSeagulls = ((int)(m_SeagullLevelSurvival.Time / 100) + (int)(m_SeagullLevelSurvival.SavedSeagulls * 50));

                    bool onlyonce = false;
                    for (int i = 0; m_HighScoreSeagullsSurvival.Count > i; ++i)
                    {
                        if (onlyonce == false)
                        {
                            if (m_HighScoreSeagullsSurvival.ElementAt(i) < m_ScoreSeagulls)
                            {
                                m_HighScoreSeagullsSurvival.Insert(i, m_ScoreSeagulls);
                                onlyonce = true;
                            }
                        }
                    }

                    saving("SeagullsSurvival");
                    m_HighScoreSeagullsSurvival = Loading("SeagullsSurvival", m_HighScoreSeagullsSurvival);
                }
            }

            if (m_LevelNuber == 2)
            {
                if (m_SurvivalMode == false)
                {
                    m_ScoreFishes = (int)((5000 - (m_FishLevel.Time / 50)) - (m_FishLevel.DeadFish * 500));

                    bool onlyonce = false;
                    for (int i = 0; m_HighScoreFishes.Count > i; ++i)
                    {
                        if (onlyonce == false)
                        {
                            if (m_HighScoreFishes.ElementAt(i) < m_ScoreFishes)
                            {
                                m_HighScoreFishes.Insert(i, m_ScoreFishes);
                                onlyonce = true;
                            }
                        }
                    }

                    saving("Fishes");
                    m_HighScoreFishes = Loading("Fishes", m_HighScoreFishes);
                }

                else 
                {
                    m_ScoreFishes = (int)((m_FishLevelSurvival.Time / 100) + (m_FishLevelSurvival.SavedFish * 20));

                    bool onlyonce = false;
                    for (int i = 0; m_HighScoreFishesSurvival.Count > i; ++i)
                    {
                        if (onlyonce == false)
                        {
                            if (m_HighScoreFishesSurvival.ElementAt(i) < m_ScoreFishes)
                            {
                                m_HighScoreFishesSurvival.Insert(i, m_ScoreFishes);
                                onlyonce = true;
                            }
                        }
                    }

                    saving("FishesSurvival");
                    m_HighScoreFishesSurvival = Loading("FishesSurvival", m_HighScoreFishesSurvival);
                }
            }

            if (m_LevelNuber == 3)
            {
                 m_ScoreHumans = m_HumanLevel.Score;

                    bool onlyonce = false;
                    for(int i = 0; m_HighScoreHuman.Count >i ; ++i)
                    {
                        if(onlyonce == false)
                        {
                            if (m_HighScoreHuman.ElementAt(i) < m_ScoreHumans)
                            {
                                m_HighScoreHuman.Insert(i, m_ScoreHumans);
                                onlyonce = true;
                            }
                        }
                    }

                    saving("Humans");
                    m_HighScoreHuman = Loading("Humans", m_HighScoreHuman);
                 
                if(m_StoryMode == true)
                {
                    int score = m_ScoreSeagulls + m_ScoreFishes + m_ScoreHumans;

                    bool onlyonce2 = false;
                    for(int i = 0; m_HighScoreStory.Count >i ; ++i)
                    {
                        if(onlyonce2 == false)
                        {
                            if (m_HighScoreStory.ElementAt(i) < score)
                            {
                                m_HighScoreStory.Insert(i, score);
                                onlyonce2 = true;
                            }
                        }
                    }

                    saving("Story");
                    m_HighScoreStory = Loading("Story", m_HighScoreStory);
                }
            }
        }

        public void Cleared()
        {
            switch (m_LevelNuber)
            {
                case 1 :

                    if (m_SurvivalMode == false)
                    {
                        m_SeagullList = m_SeagullLevel.GetSeagullList;
                        for (int i = 0; i < m_SeagullList.Count; i++)
                        {
                            if (m_SeagullList[i].Boundingbox.Max.X < 800)
                            {
                                m_SeagullList[i].HasbeenSwiped = true;
                                m_SeagullList[i].Velocity = new Vector2(5, -5);
                                m_SeagullList[i].AddStrenght(100, m_Eventhandler);
                            }
                        }
                    }

                    else
                    {
                        m_SeagullList = m_SeagullLevelSurvival.GetSeagullList;
                        for (int i = 0; i < m_SeagullList.Count; i++)
                        {
                            if (m_SeagullList[i].Boundingbox.Max.X < 800)
                            {
                                m_SeagullList[i].HasbeenSwiped = true;
                                m_SeagullList[i].Velocity = new Vector2(5, -5);
                                m_SeagullList[i].AddStrenght(100, m_Eventhandler);
                            }
                        }
                    }
                    break;

                case 2 :

                    if (m_SurvivalMode == false)
                    {
                        m_FishList = m_FishLevel.GetFishList;
                        for (int i = 0; i < m_FishList.Count; i++)
                        {
                            m_FishList[i].HasEaten = true;
                            if (m_FishList[i].Boundingbox.Min.X < 400)
                            {
                                m_FishList[i].Velocity = new Vector2(-5, 0);
                            }
                            else
                                m_FishList[i].Velocity = new Vector2(5, 0);

                        }
                    }

                    else
                    {
                        m_FishList = m_FishLevelSurvival.GetFishList;
                        for (int i = 0; i < m_FishList.Count; i++)
                        {
                            m_FishList[i].HasEaten = true;
                            if (m_FishList[i].Boundingbox.Min.X < 400)
                            {
                                m_FishList[i].Velocity = new Vector2(-5, 0);
                            }
                            else
                                m_FishList[i].Velocity = new Vector2(5, 0);

                        }
                    }
                    break;
                case 3 :
                    m_HumanLevel.clear();
                    break;
            }

        }

        public void PauzeMenu()
        {
            m_Pauzed = true;
            m_BeatReader.Pause(true);
        }
    }
}
